#include "hpy.h"
#include <bits/stdc++.h>

using namespace std;

int main(int argc, char* argv[])
{
    registerGen(argc, argv, 1);
    auto [n, x, w] = tuple{opt<int>(1), opt<int>(2), opt<int>(3)};
    println(n);
    vector<int> v(n);
    for(int i = 0; i < n; i ++) {
        v[i] = rnd.wnext(0, x, w);
    }
    println(v);
}
